package com.xiangxiangjd.kj.papersstar.bean;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author 肖守凯
 * @since 2021-01-21
 */
@Data
@TableName("questionnaire")
@ApiModel(value="Questionnaire对象", description="")
public class
Questionnaire extends Model<Questionnaire> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "选题id")
    @TableId(value = "id",type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "问卷标题")
    @TableField("questionnaire_title")
    private String questionnaireTitle;

    @ApiModelProperty(value = "用户ID ")
    @TableField("user_id")
    private String userId;


    //自动新增时间
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private String createTime;
    //自动更新时间

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private String updateTime;


    @ApiModelProperty(value = "0正常  1停用")
    @TableField("del_flag")
    private String delFlag;



    @ApiModelProperty(value = "0未发布/1发布/2停用")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "问卷类型/1调查/2考试")
    @TableField("questionnaire_type")
    private String questionnaireType;

    //所有回答的问题
    @TableField(exist = false)
    private List<Topic> topics;

    //已经回答的所有用户
    @TableField(exist = false)
    List<QuestionnaireUser> questionnaireUsers;

}
